1. Field of the Invention
The present invention relates to a peripheral switching device configured to switch an ownership of a peripheral between a plurality of operating systems that concurrently operate on a computer system.
And, the present invention relates to a peripheral switching control device provided for each of a plurality of operating systems in a computer system including the peripheral switching device.
2. Description of the Related Art
In recent years, software such as the “Xen” and the “VMWare” has been developed and provided as a technique of a virtual machine monitor allowing multiple virtual machine environments to be implemented on one computer system.
Such a virtual machine monitor technique enables multiple operating systems (abbreviated as OSs below) having different purposes such as for private use and business use or for system use and end-user use, to concurrently operate on a single terminal (a computer system) such as a mobile phone or a PC. Further, this technique enables different types of OSs such as “Linux (registered trademark)” and “Windows Mobile (registered trademark)”, to concurrently operate on the single terminal.
When a user uses these multiple OSs while switching the OSs between foreground and background, it is necessary to switch the ownership of a peripheral such as an LCD (liquid crystal display), a keypad, a mouse, a speaker and a microphone to the foreground OS.
U.S. Pat. No. 6,496,847 discloses a technique for sharing peripherals between a host OS and a guest OS.
When a user presses a switch button for switching between a foreground OS and a background OS, or when a user selects a window corresponding to the background OS, use of this technique allows the background OS to be set to the foreground, and also peripherals such as an input device and a display device to be assigned to the newly-set foreground OS.
In addition, with this technique, it is also possible to perform mixing of audio outputs from the foreground OS and the background OS.
However, the foregoing conventional technique is not provided with means for prohibiting (locking) switching of the ownership of a certain peripheral between OSs and means for flexibly arbitrating peripheral contention between OSs. For this reason, with the conventional technique, it is difficult to secure quality of important services such as a telephone.
Moreover, the conventional technique has a problem of uselessly consuming resources when a peripheral shared by multiple OSs is set to off by one of the OSs, because the other OS keeps on attempting to communicate with the peripheral without being aware that the peripheral has been set to off. This useless resource consumption is caused by a lack of controller for stopping the other OS from making communications for input-output with the peripheral.
To be more precise, a computer system configured to switch the ownership of a peripheral among concurrently operating multiple OSs sometimes confronts a case where the switching of the ownership of a peripheral between the OSs must not be executed, even when a user or an application requests to switch the ownership of the peripheral to the OS. The conventional technique, however, does not support such a case.
Here, consider cases, as examples, where an ownership of a peripheral is switched to background OS, in order to display an e-mail incoming to the background OS, and where an ownership of a peripheral is switched to background OS, because a user presses the aforementioned switch button in order to use a function provided to the background OS.
One possible case may occur under a condition in which a telephone application on the foreground OS is currently used for telephone conversations. More precisely, under this condition, it is desirable to maintain the current foreground OS as the OS to which a microphone and a speaker are assigned, even though it does not matter to switch the OS to which an LCD and a keypad are assigned to background OS.
If the OS to which the microphone and the speaker are assigned is switched to background OS under the conditions in which the telephone application is currently used for telephone conversations, a problem occurs that the call through the telephone application is disrupted.
As another example of the cases where it is desirable to prohibit (lock) the switching of the ownership of a peripheral between OSs, there is a case where the background OS detects a fault or anomaly in the foreground OS, whereby the switching of the OSs between foreground OS and background OS is forcibly performed. In this case, even when the OS having the fault or anomaly requests to switch the ownership of a peripheral, it is desirable not to switch the ownership of the peripheral.
Unless the switching of the OSs between foreground OS and background OS is forcibly performed, the OS having the faulty or anomaly shows a faulty screen on the LCD to the user, and thereby the user may be bewildered.
In addition, if a peripheral is assigned to the OS having the faulty or anomaly, the user unavoidably operates on the OS having the faulty or anomaly. As a result, inappropriate processing may be performed.
On the other hand, if the ownership of the microphone and the speaker is controlled separately from the aforementioned switch button, a problem of a contention for the peripheral between the OSs has occurred.
When there is an incoming call to the background OS while a speech recognition application owns and uses the microphone on the foreground OS, there is a possibility that it is impossible to execute a telephone call operation in response to the incoming call, because the foreground OS uses the microphone exclusively.
This possibility cannot be avoided only by simply giving higher priority for the microphone to the background OS than the foreground OS. Specifically, when there is an incoming call to the foregoing OS while a speech recognition application owns and uses the microphone on the background OS, it may be also impossible to perform a telephone call operation in response to the incoming call.
Even when the priority of a first OS is set higher or lower than that of a second OS in an environment where the two OSs are installed, the same problem still exists.
In addition, this computer system may have a case where, when a peripheral shared by the OSs is set to off by one of the OSs, it is desirable that the other OS should stopping data communications for input-output with the peripheral.
For example, when the foreground OS sets a shared speaker to off by setting a manner mode even while music is being played on the background OS, the speaker also stops the output of audio data from the background OS.
However, the background OS continues to transfer the audio data to the speaker without being aware that the speaker is set to off. In this way, resources may be consumed in vain in some cases.